// source --> https://ramahnyack.org/wp-content/plugins/imagemapper/imagemapper_script.js?ver=5.2.9 /* ImageMapper Wordpress frontend script */ var Image; var Canvas, Ctx; jQuery(function($) { $('img[usemap]').each(function() { var areas = []; $('map[name="' + $(this).attr('usemap').substr(1) + '"]').find('area').each(function() { areas.push({ 'key': $(this).attr('data-mapkey'), 'toolTip': $(this).attr('data-tooltip'), 'isSelectable': false, 'render_highlight': { 'fillColor': $(this).attr('data-fill-color'), 'fillOpacity': $(this).attr('data-fill-opacity'), 'strokeColor': $(this).attr('data-stroke-color'), 'strokeOpacity': $(this).attr('data-stroke-opacity'), 'stroke': $(this).attr('data-stroke-width') > 0, 'strokeWidth': $(this).attr('data-stroke-width'), 'fade': true, 'fadeDuration': 300 } }); }); var map = this; $(this).mapster({ clickNavigate: true, showToolTip: true, toolTipContainer: $('
'), toolTipClose: ['area-click'], mapKey: 'data-mapkey', onClick: AreaClicked, onMouseover: function(m) { if(!m.options.toolTip.length) $(map).mapster('tooltip', false); clearTimeout($(map).data('mapster-highlight-timeout')); $(map).mapster('highlight', false); $(map).mapster('highlight', m.key); }, singleSelect: true, render_select: { fillOpacity: 0 }, areas: areas }); // If pulse option is set, initialize it. if(imgmap.pulseOption && imgmap.pulseOption != 'never') { $(this).mouseenter(function(e) { //Prevent pulse from happening when mouse moves on the image map from tooltip or area. (Prevent mouseenter from "inner" elements) if($(e.fromElement).hasClass('imagemapper-tooltip') || $(e.fromElement).is('area')) return; //If this is set true, the pulse has been done already and Wordpress doesn't want to do it again. if(!$(this).attr('data-first-mouseenter')) { //Mark image map as "pulsed" if the first_time pulse option is set. if(imgmap.pulseOption == 'first_time') $(this).attr('data-first-mouseenter', true); //Prevent duplicate highlights $(this).mapster('highlight', false); //Highlight all areas for(var area in areas) { $(this).mapster('highlight', areas[area].key); } var map = this; // Stop highlighting after a short delay // Also fade highlighted areas out rather than hide them instantly clearTimeout($(this).data('mapster-highlight-timeout')); $(this).data('mapster-highlight-timeout', setTimeout(function() { $(map).closest('.imgmap-frontend-image').find('canvas').each(function() { $(this).stop().animate({ opacity: 0 }, 300, function() { $(map).mapster('highlight', false); }); }); }, 500)); } }); } //Close tooltips when clicking outside the tooltip. $('body').click(function(e) { if(!$(e.target).is('.imagemapper-tooltip') && !$(e.target).closest('.imagemapper-tooltip').length && $(e.target).attr('data-type') != 'tooltip') $(map).mapster('tooltip', false); if(!$(e.target).is('.imgmap-dialog-alt') && !$(e.target).closest('.imgmap-dialog-alt').length) $('.imgmap-dialog-alt').hide(200); }); }); if(!imgmap.alt_dialog) { if($().dialog) { $('.imgmap-dialog-wrapper').dialog({ autoOpen: false, zIndex: 10000, maxWidth: 700, width: 'auto', show: 300, dialogClass: 'imgmap-dialog', position: { of: $(parent) } }); $('body').click(function(e) { if(!$(e.target).is('.ui-dialog, a') && !$(e.target).closest('.ui-dialog').length) $('.imgmap-dialog-wrapper').each(function(e) { $(this).dialog('close'); }); }); } else { if($('area[data-type="popup"]').length) { if(imgmap.admin_logged) { var close = $(''); close.text('Close').css( { cursor: 'pointer', float: 'right', fontSize: '0.9em' }); close.click(function() { $('.imgmap-dialog-wrapper').text(''); }); $('.imgmap-dialog-wrapper'). html("There was a problem loading jQuery UI Dialog widget. A plugin or a theme you're using might be including its own copy of jQuery library which causes conflict with the copy included in Wordpress. Because of this ImageMapper isn't able to use jQuery UI Dialog widget causing the popup window function incorrectly or not at all.
This message is shown only to an admin. This message is shown because some of the image map areas on this page are using the popup functionality and thus not working properly."). css({ color: 'red', padding: '5px', fontSize: '0.8em' }).append(close); } } } } $('.alternative-links-imagemap'). click(AlternativeLinkClicked). mouseenter(function () { var mapster = $($(this).attr('data-parent').replace('imgmap', '#imagemap')).get(0); jQuery(mapster).mapster('highlight', false); jQuery(mapster).mapster('highlight', $(this).attr('data-key')); }). mouseleave(function () { var mapster = $($(this).attr('data-parent').replace('imgmap', '#imagemap')).get(0); jQuery(mapster).mapster('highlight', false); }); $('.altlinks-toggle').click(function() { $('#altlinks-container-' + $(this).attr('data-parent')).toggle(200); }); }); function AlternativeLinkClicked() { var key = jQuery(this).attr('data-key'); var type = jQuery(this).attr('data-type'); var parent = jQuery(this).attr('data-parent'); AlternativeLinkAction(key, type, parent); } function AlternativeLinkAction(areaKey, areaType, imagemap) { switch(areaType) { case 'popup': OpenImgmapDialog(areaKey, jQuery('map[name="' + imagemap + '"]').get(0)); break; case 'tooltip': imagemap = jQuery('img[usemap="#' + imagemap + '"]').get(0); jQuery(imagemap).mapster('tooltip', areaKey); break; } } function AreaClicked(data) { var type = jQuery('area[data-mapKey='+data.key+']').attr('data-type'); if(type == 'popup' || type == '' ) { OpenImgmapDialog(data.key, jQuery(this).parent()[0]); } } function OpenImgmapDialog(key, parent) { var image = jQuery('#' + parent.name.replace('imgmap', 'imagemap')); var dialog = parent.name.replace('imgmap', '#imgmap-dialog'); jQuery.post(imgmap.ajaxurl, { action: 'imgmap_load_dialog_post', id: key.replace('area-', '') }, function(response) { if(response.length <= 0) return; if(!imgmap.alt_dialog) { jQuery(dialog).dialog('option', 'title', jQuery('area[data-mapkey='+key+']').attr('title')); jQuery(dialog).html(response).dialog('open'); } else { // Some ugly quick bug-fixing code // Sometimes it's needed since everything does not always make sense. Or at least seem to do. // Resets the element // Without this centering the element doesn't work well jQuery(dialog).replaceWith('').hide(0); jQuery(dialog).addClass('imgmap-dialog-alt').html(response); setTimeout(function() { jQuery(dialog).position({ my: 'center', at: 'center', of: image }). hide(). css({visibility:'visible'}). show(200); }, 0); } }); }; // source --> https://ramahnyack.org/wp-content/plugins/wp-video-lightbox/js/jquery.prettyPhoto.min.js?ver=3.1.6 /* ------------------------------------------------------------------------ Class: prettyPhoto Use: Lightbox clone for jQuery Author: Stephane Caron (http://www.no-margin-for-errors.com) Version: 3.1.6 ------------------------------------------------------------------------- */ !function(t){function e(){var t=location.href;return hashtag=-1!==t.indexOf("#prettyPhoto")&&decodeURI(t.substring(t.indexOf("#prettyPhoto")+1,t.length)),hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function i(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==i?"":i[1]}t.prettyPhoto={version:"3.1.6"},t.fn.prettyPhoto=function(p){p=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'
\t\t\t\t\t\t
 
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\tExpand \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\tnext \t\t\t\t\t\t\t\t\t\t\tprevious \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\tPrevious \t\t\t\t\t\t\t\t\t\t\t\t

0/0

\t\t\t\t\t\t\t\t\t\t\t\tNext \t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t

\t\t\t\t\t\t\t\t\t\t\t
{pp_social}
\t\t\t\t\t\t\t\t\t\t\tClose \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t
\t\t\t\t\t
',gallery_markup:'',image_markup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
{content}
',custom_markup:"",social_tools:'
Tweet